﻿<%@ Control Language="C#" Inherits= "System.Web.Mvc.ViewUserControl<HuynhQuangWebsite.Models.HomeListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>
<%@ Import Namespace="HuynhQuangWebsite.Models" %>
		
	<section class="pagemid">
		<div class="inner">
			<%if (Model != null)
            {
                 if (Model.ServiceList != null)
                 { %>		
			        <div id="main">
				        <div class="entry-content">
					        <%foreach(var item in Model.ServiceList){ %>	
					        <div class="one_fourth">
					        <%=Html.FriendlyImageUrl(item.ServiceImgThumb,"Chi_tiet","Dich_vu",new RouteValueDictionary{{"id",item.ServiceID},{"title",Url.EncodeFriendlyUrl(item.ServiceName)}})%>
					        </div>							
					        <div class="three_fourth last">
						        <h4><%=Html.FriendlyTextUrl(item.ServiceName,"Chi_tiet","Dich_vu",new RouteValueDictionary{{"id",item.ServiceID},{"title",Url.EncodeFriendlyUrl(item.ServiceName)}})%></h4>
						        <p><%=item.ServiceDetails %></p>
                               <%if (Model.ServiceAttributeList != null)
                                 { %>
						        <ul class="list-check black">
                                <%foreach (var atribute in Model.ServiceAttributeList.Where(p => p.FK_ServiceID == item.ServiceID).ToList())
                                  { %>
							        <li><%=atribute.ServiceAttributeName%></li>
							        <%} %>
						        </ul>
							        <%} %>	
					        </div>
							
					        <div class="divider_line"></div>
						        <%} %>	
                     
					                <div class="pagination wp-pagenavi">
                                            <%=Ajax.Pager(Model.ServiceInfo.CurrentPage, Model.ServiceInfo.TotalItems, "ServiceList", 0, Model.ServiceInfo.ItemsPerPage, "Paging")%>
					                </div>			

							        <%}
                } %>
					<h2>Service Lists</h2>
					<div class="one_half">
						<h5>Service List-1</h5>
						<p>Maecenas id lectus odio, non fermentum mi. Phasellus urna ipsum, rutrum in sagittis tristique, congue quis magna. Nam</p>
						<ul>
							<li>Lorem ipsum dolor sit ame</li>
							<li>Nulla non nulla sed neque</li>
							<li>Morbi vel est augue, adipiscing</li>
							<li>Donec sed ipsum eu magna placerat</li>
						</ul>							
					</div>
							
					<div class="one_half last">
						<h5>Service List-2</h5>
						<p>Aenean et massa sed lacus varius semper eu at neque. Pellentesque sed tempus quam. Pellentesque auctor condimentum leo</p>
						<ul>
							<li>Lorem ipsum dolor sit ame</li>
							<li>Nulla non nulla sed neque</li>
							<li>Morbi vel est augue, adipiscing</li>
							<li>Donec sed ipsum eu magna placerat</li>
						</ul>
							
					</div>

					<div class="clear"></div>	
						
				</div>
				<!-- .entry-content -->
			</div>
			<!-- #main -->
						
			<div id="sidebar">
            <div id="loadcustomer">
            <%Html.RenderPartial("UCCustomerList"); %>

            <%--<aside class="syswidget">
				<h3 class="widget-title">Khách hàng<span></span></h3>
                <%if (Model.CustomerList != null)
                    {%>
                    <ul>
                    <% foreach (var item in Model.CustomerList)
                        { %>
					<li><%=Ajax.ActionLink(item.CustomerName, "ShowCustomer", new { id=item.CustomerID}, new AjaxOptions { HttpMethod="POST", UpdateTargetId = "loadCustomer" })%></li>
					<%}
                    }%>								
				</ul>
			</aside>--%>
            </div>
				<%--<div class="widget-area">

					<aside class="syswidget textwidget">
						<h3 class="widget-title">Khách hàng của chúng tôi</h3>
						<img src="../../Images/image1.jpg" alt="img" class="imageshadow bottom20" />
						<p><strong>Dịch vụ chuyên nghiệp của chúng tôi đã đươc khách hàng đánh giá rất cao...</strong></p>
                        <div id="loadCustomer">
                        <%if (ViewData["customer"] == null)
                          {
                              if (Model.CustomerList != null)
                              { %>
                        <img src ="<%=(Model.CustomerList[0] as Customer).CustomerImgThumb %>" alt="" /><br />
                        <p><%= (Model.CustomerList[0] as Customer).CustomerName%></p>
                        <%}
                              else
                              { %>
                        <img src ="<%=(ViewData["customer"] as Customer).CustomerImgThumb %>" alt="" /><br />
                         <p><%:(Model.CustomerList[0] as Customer).CustomerName%></p>
                        <%}
                          } %>
                        </div>
					</aside>
					<!-- .syswidget -->

					<aside class="syswidget">
						<h3 class="widget-title">Khách hàng<span></span></h3>
                        <%if (Model.CustomerList != null)
                          {%>
                          <ul>
                          <% foreach (var item in Model.CustomerList)
                              { %>
							<li><%=Ajax.ActionLink(item.CustomerName, "ShowCustomer", new { id=item.CustomerID}, new AjaxOptions { HttpMethod="POST", UpdateTargetId = "loadCustomer" })%></li>
							<%}
                          }%>								
						</ul>
					</aside>
					
					<!-- .syswidget -->
						
				</div>--%>
				<!-- .widget-area -->
			</div>
			<!-- #sidebar -->
		
		</div>
		<!-- .inner -->
	</section>
    <!-- .pagemid -->